export function toThousandFilter(num) {
	return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
}
// 格式化时间
export function timeFilter(value) {
	var theTime = parseInt(value);
	var theTime1 = 0;
	var theTime2 = 0;
	if (theTime >= 60) {
		theTime1 = parseInt(theTime / 60);
		theTime = parseInt(theTime % 60);
		if (theTime1 >= 60) {
			theTime2 = parseInt(theTime1 / 60);
			theTime1 = parseInt(theTime1 % 60);
		}
	}
	if (theTime < 10) {
		theTime = "0" + parseInt(theTime)
	}
	var result = "" + theTime + "";
	if (theTime1 >= 0) {
		if (theTime1 < 10) {
			theTime1 = "0" + parseInt(theTime1)
		}
		result = "" + theTime1 + ":" + result;
	}
	if (theTime2 >= 0) {
		if (theTime2 < 10) {
			theTime2 = "0" + parseInt(theTime2)
		}
		result = "" + theTime2 + ":" + result;
	}
	return result;
}
export function chargingRecordFilter(status) {
	return ['充电中','','客服已核实退回','端口故障','大功率退款'][status-1];
}
